package cn.lu.joke.mvp.presenter.user;

import cn.lu.joke.entry.ResultData;
import cn.lu.joke.entry.User;
import cn.lu.joke.mvp.model.CallbackImpl;
import cn.lu.joke.mvp.model.DataModelManager;
import cn.lu.joke.mvp.model.UserModel;
import cn.lu.joke.mvp.presenter.BasePresenter;
import cn.lu.joke.mvp.view.IUserView;

public class MinePresenterImpl extends BasePresenter<IUserView.IMineView> implements IMinePresenter {
    public MinePresenterImpl(IUserView.IMineView view) {
        super(view);
    }

    @Override
    public void getMineInfo() {
        DataModelManager.create(UserModel.class)
                .getMineInfo(new CallbackImpl<ResultData<User>, IUserView.IMineView>(getView()) {
                    @Override
                    public void onSuccess(ResultData<User> data) {
                        mView.onMineInfo(data);
                    }
                });
    }
}
